home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Add-Ons / MicroPhone / Open Mike™ / Open Mike™ 011 / Mike's Folder / Functional Literacy < prev    next >
Encoding:
Text File  |  1993-11-01  |  2.1 KB  |  38 lines  |  [TEXT/ttxt]

  1. Functional Literacy
  2. ===================
  3. Copyright © 1993 by Celestin Company
  4. All rights reserved.
  5.  
  6. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without permission in writing from the publisher. However, you are permitted to make copies of this work, printed or otherwise, as long as said copies are for your personal use only.
  7.  
  8. Introduction
  9. ------------
  10. MicroPhone's script language has a wealth of functions, each of which serves a specific purpose. We take a look at a handful of functions and come up with some real world examples of how to use them.
  11.  
  12. FillStr
  13. -------
  14. Use this function when you want to fill something with a repetitive series of information. For example, if you want to have the words "Hello World" appear on your screen 30 times, you could use a script like this:
  15.  
  16.   Send Local to Screen "FillStr('Hello World',30)"
  17.  
  18. ItemCount
  19. ---------
  20. Use this function when you want to count how many times a specific text string appears in a larger string, delimited by a certain character. For example, if your string is 'a,b,c,d,e' and your delimiter is a comma, ItemCount would return 5, since there are five items delimited by a comma.
  21.  
  22. ItemDelete
  23. ----------
  24. Use this function when you want to delete a string that appears in a larger string. For example, if your string is 'a,b,c,d,e' and you want to delete the third item, use a script like this:
  25.  
  26.   Set Variable itemList from Expression "ItemDelete(itemList,',',3)"
  27.  
  28. ItemFetch
  29. ---------
  30. Use this function when you want to retrieve a string that appears in a larger string. For example, if your string is 'a,b,c,d,e' and you want to retrieve the third item, use a script like this:
  31.  
  32.   Set Variable myItem from Expression "ItemFetch('a,b,c,d,e',',',3)"
  33.  
  34. ItemReplace
  35. -----------
  36. Use this function when you want to replace a string that appears in a larger string. For example, if your string is 'a,b,c,d,e' and you want to replace the third item with 'x', use a script like this:
  37.  
  38.   Set Variable itemList from Expression "ItemReplace('x',itemList,',',3)"